﻿<go:ControlPageBase x:Class="SuperGo.Silverlight.Loading"
    xmlns="http://schemas.microsoft.com/client/2007" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:go="clr-namespace:SuperGo.Silverlight"
    >

    <UserControl.Triggers>
        <EventTrigger RoutedEvent="Canvas.Loaded">
            <EventTrigger.Actions>
                <BeginStoryboard>
                    <Storyboard x:Name="Storyboard1" RepeatBehavior="Forever">
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(Shape.StrokeDashOffset)" BeginTime="00:00:00">
                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                            <SplineDoubleKeyFrame KeyTime="00:00:10" Value="-100"/>
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger.Actions>
        </EventTrigger>
    </UserControl.Triggers>
    
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>

        <Grid Grid.RowSpan="3" Grid.ColumnSpan="3" Background="Gray" Opacity=".7" />

        <Border Background="White" CornerRadius="15" BorderBrush="Black" BorderThickness="1" VerticalAlignment="Center" HorizontalAlignment="Center" Padding="5" Grid.Row="1" Grid.Column="1" Opacity="1">
            <StackPanel Orientation="Horizontal" >
                <TextBlock Text="Loading Please Wait" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,10,0" />
                <Ellipse Stroke="Black" StrokeDashArray="1,2" StrokeThickness="1" StrokeDashCap="Round" Height="22" Width="22" x:Name="ellipse" RenderTransformOrigin="0.5,0.5"/>                    
            </StackPanel>
        </Border>
    </Grid>
</go:ControlPageBase>
